function fctAfterLocus()
{
	var sValue="";
	var sValue2="";
		
	sValue = document.getElementById("hla_locus").value;	
	//... Positioning first value for the locus ...//
	if(sValue!="")
	{
		var xmlHttp;
		var sURL = "ajaxHLA.asp";
		
		try
		{  
			 // Firefox, Opera 8.0+, Safari  
			 xmlHttp=new XMLHttpRequest();  
		 }
		 catch (e)
		 { 
			 // Internet Explorer  
			 try
			 {    
				   xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
			 }
			 catch (e)
			 {    
				   try
				   {      
						 xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");     
				   }
				   catch (e)
				   {      
						 //alert("Your browser does not support AJAX!");      
						 return false;      
				   }    
			 }  
		 }
	   
		 xmlHttp.onreadystatechange=function()
		 {
			 if(xmlHttp.readyState==4)
			 {
	               document.getElementById("alleles_results").innerHTML=xmlHttp.responseText;
				   document.form1.hla_allele1.options.length=0;
				   document.form1.hla_allele2.options.length=0;
				   var sCad1 = document.getElementById("alleles_results").innerHTML;
				   var iLCad1 = sCad1.length;
				   var iItems = 0;
				   var sCad2 = "";
				   var sHow_many = "";
				   var iHow_many = 0;
				   var iJ = 0;
				   while (iJ<iLCad1)
				   {					   	
						if(sCad1.substring(iJ+1,iJ)==",")
						{
								iJ++;
								break;
						}
					   	sHow_many = sHow_many + sCad1.substring(iJ+1,iJ);
						iJ++;
				   }
				   iHow_many = parseFloat(sHow_many);
				   
				   document.form1.hla_allele1.options[0]= new Option("", "", false, false);
				   document.form1.hla_allele2.options[0]= new Option("", "", false, false);
  				   iItems++;				   
				   while (iJ<iLCad1)
				   {
					   	if(sCad1.substring(iJ+1,iJ)==",")
						{
				   				document.form1.hla_allele1.options[iItems]= new Option(sCad2, sCad2, false, false);
				   				document.form1.hla_allele2.options[iItems]= new Option(sCad2, sCad2, false, false);
								iItems++;
								iJ++;
								sCad2 = "";
						}
						sCad2 = sCad2 + sCad1.substring(iJ+1,iJ);
						iJ++;
				   }
			 }
		 }
		 sURL = sURL + "?" + "hla_locus=" + sValue;
		 xmlHttp.open("GET", sURL, false);
		 xmlHttp.send(null); 
	}
	document.getElementById("hla_allele1").focus();		
}
function fctAfterAllele()
{	
	document.getElementById("hla_allele2").value = document.getElementById("hla_allele1").value;
	document.getElementById("hla_allele2").focus();	
}